home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / packer / s-pack / s-pack.doc < prev    next >
Text File  |  1995-03-09  |  15KB  |  365 lines

  1.  
  2.  
  3.                             S - P A C K 
  4.  
  5.  
  6.     S-PACK compresses and packs disks, HD partitions, drawers, and files into
  7.  as small a volume as possible.  It can be used as an archiver, HD Backup, for
  8.  preparing files for data transmission, and anywhere space on disks needs to
  9.  be used economically.
  10.  
  11.  
  12.    CALLING S-PACK
  13.  
  14.    WorkBench:   Click the icon.
  15.    CLI:         Enter "S-PACK", use RUN if you wish.
  16.  
  17.     there are no switches or tool types required.
  18.  
  19.  
  20.    CREATING PACKS
  21.  
  22.    When S-Pack is called a requester will appear.  At the top are four mode
  23.   buttons, one for each of the available modes:
  24.  
  25.    PACK:    Click if you are going to make a new Pack.
  26.  
  27.    UNPACK:  Click if you want to unpack an existing Pack.
  28.  
  29.    LIST:    Click to extract the index from a Pack.
  30.  
  31.    EXTRACT: Click to extract a single file from a PACK.
  32.  
  33.  
  34.    Below these are four string gadgets.  When a mode gadget is switched on
  35.   any string gadgets not required for that mode will be ghosted.
  36.  
  37.    FILES:   used in Pack and Extract.
  38.  
  39.       Pack mode:    enter the disk, HD partition, drawer or file to be packed.
  40.                
  41.       Extract mode: enter the file to be extracted .  Filename should be
  42.                     written as it appears in the index, however it is not
  43.                     case-sensitive and the wildcard `?' is recognised.
  44.  
  45.     Clicking the button just to the left of the gadget will bring up a file
  46.     requester if you have either Arp.library or ASL.library.
  47.  
  48.  
  49.    PACKFILE: used in all modes.
  50.  
  51.      Pack mode:   Enter name and path for the pack; the programme will add
  52.                 .PACK  or .SE to the name that you enter here, according to
  53.                 whether the Pack is self-unpacking or not.  If a floppy
  54.                 drive is called put a disk - normally empty - in the required
  55.                 drive, and quote the drive name (eg df1:) rather than the disk
  56.                 name.  Existing data on the disk will NOT be deleted. 
  57.   
  58.      Unpack/List/Extract:  Enter the full name and path to the Pack,
  59.                 INCLUDING ANY TERMINATING .PACK or .SE.  If unpacking or
  60.                 getting an index from floppies put the LAST disk of the pack
  61.                 in whatever drive is designated.
  62.   
  63.      A button is again provided for a file requester.  The output may need to
  64.     be modified to ensure that floppies are referred to by drive and not name
  65.     (for multi-disk packs).
  66.  
  67.  
  68.    TO: used in Unpack, List and Extract
  69.  
  70.      Unpack mode:  Destination for the unpacked files.   Entry can be a
  71.                 disk, HD partition or drawer.  If a disk or HD partition you
  72.                 MUST end with ":".  If just a name is entered the program
  73.                 will open a drawer of that name on the Current Directory,
  74.                 and use that.   Default destination is a drawer "Output"
  75.                 opened in the current directory.
  76.  
  77.      List mode:    Enter filename and path for the extracted index.  Default
  78.                 is "RAM:List".  
  79.  
  80.      Extract mode: Destination for the extracted file.  May be a disk, HD
  81.                 partition or drawer.  Comments at Unpack mode above apply.
  82.                 Default is "RAM:Extract"
  83.  
  84.      A button is provided for a file requester.  Again modify the output
  85.     if necessary to ensure that floppies are referred to by drive, not name.
  86.  
  87.  
  88.    TEMP FILES:     can be used in all modes.
  89.  
  90.      When packing or unpacking heavy use is made of intermediate files,
  91.     by default opened in RAM:T.  Where ram is limited it can be useful to
  92.     shuffle these temporary files off to a disk or HD partition.  Enter the
  93.     required drive or partition here, terminating with ":".  The programme
  94.     will add "T" to the drive and if necessary open the new drawer.
  95.          
  96.  
  97.    Below these string gadgets are four more buttons:
  98.  
  99.     OK:  Accepts the entries and executes.
  100.  
  101.     SE:  Used only when Packing.  Adds a self-unpacking header (6590 bytes)
  102.         and turns the pack into an executable programme.
  103.        
  104.     RECOMP:  Used only during Packing.  If a file compressed with Power
  105.         Packer or the standard P-Compress code is encountered it will be
  106.         re-compressed using S-PACK's more efficient compressor (the same as
  107.         the SuperC option of P-Compress2).  This will reduce the size of the 
  108.         completed pack.  On unpacking, such files will be decompressed and
  109.         not restored to their original state.  This may be the normal option
  110.         if S-Pack is being used as an Archiver.
  111.  
  112.           If RECOMP is NOT called the PACK will be a little larger, but on
  113.         unpacking such files will reappear in their original PP'd or P-
  114.         Compressed state.  This will be the normal option for Backup packs.
  115.  
  116.     CANCEL:  Clear any entries.
  117.  
  118.     To quit, click the close gadget in the top left corner.
  119.  
  120.  
  121.   MULTIDISK operations.
  122.  
  123.     Of necessity any programme used for backing up a hard disk must be
  124.    capable of filling and restoring multiple disks.  With S-Pack multi-
  125.    disk archives can also be created (there is no fundamental difference
  126.    between a Pack made for HD Backup and one made for an Archive).  During
  127.    Packing a requester will call for a new disk when the current one is
  128.    full - insert an empty disk, or if you want to end the operation click
  129.    "Abort".  Insertion of a new disk will automatically be recognised.
  130.  
  131.     During other operations specific disks (Disk[n], first disk, last disk)
  132.    may be called.  Click "abort" or insert the required disk.  During
  133.    unpacking the programme will call for a new disk if it finds that there
  134.    is insufficient space on the current disk for the file that is being
  135.    unpacked. (Calls for a new disk in a hard drive partition have to be
  136.    ignored and the operation aborted).
  137.  
  138.      IF YOU WANT A MULTIDISK PACK TO HAVE AN ICON, YOU SHOULD PUT IT ON
  139.      THE FIRST DISK OF THE PACK BEFORE YOU START TO CREATE THE PACK
  140.      ITSELF.  (Otherwise there may be no room for it).
  141.  
  142.     Don't be in too much of a hurry when changing disks;  It is vital to
  143.    wait for all disk activity to stop.
  144.  
  145.  
  146.   UNPACKING.
  147.  
  148.    NON-SELF-UNPACKING PACKS:
  149.  
  150.     Call S-pack, If the pack is on floppies put the LAST disk of the pack in
  151.    a floppy drive, click UNPACK and complete the requester.  The programme
  152.    will first read the index, ask for the first disk, then start unpacking,
  153.    calling for new disks as necessary.
  154.  
  155.    SELF-UNPACKING PACKS
  156.  
  157.     A self-unpacking executable will have been produced if the SE button was
  158.    clicked when creating the pack, and can be identified by the .SE
  159.    termination.  In effect the file on the first disk becomes an executable
  160.    and calls continuation data from the remaining disks.
  161.  
  162.     To use an SE pack:
  163.       If the pack is on floppies, put the FIRST disk of the pack in any drive.
  164.     
  165.     WORKBENCH:  Provide the file with a TOOL icon and set two ToolTypes:
  166.  
  167.      DEST=<DESTINATION>  Use upper-case, no gaps.  Enter the drive or drawer
  168.                          into which you want to unpack. Default is ram:X.
  169.  
  170.            eg DEST=DF0:
  171.            or DEST=HD5:apples  A drawer "apples" will be opened if necessary.
  172.   
  173.      TEMP=<TEMPDRIVE>    Use upper-case, no gaps.  Enter the drive to be
  174.                          used for temporary files.  Default is ram:.  Do not
  175.                          omit the `:'.
  176.  
  177.           eg TEMP=DF0:   Drawer DF0:T will be opened   
  178.           
  179.  
  180.     CLI:  Call the filename.  Include the terminating .SE if present.  Two
  181.          switches are available matching the two tool-types above:
  182.  
  183.       -d<DESTINATION>  No gap between -d and drive, partition  or drawer.
  184.  
  185.       -t<TEMPDRIVE>    No gap again. Must be a drive or HD partition, not a
  186.                          drawer.
  187.  
  188.            eg:  df2:HD5BackUp.SE -dHD5:apples -tHD4:
  189.  
  190.           This would unpack the file "HD5BackUp.SE" to HD5:apples, using 
  191.         HD4:T for temporary files.  Note the colons in HD5 and HD4; they
  192.         must not be omitted.
  193.  
  194.         Defaults are the same, ram:X for destination and ram: for temps.
  195.  
  196.         If you type the name followed by  `?', eg df2:HDBackUp.SE ?, a
  197.       Usage string "Usage: xxxx.SE -d<destination> -t<tempdrive>" will be
  198.       printed to the screen.
  199.  
  200.     To otain the index for an SE pack, treat it like a non-SE pack - put the
  201.    last disk in a drive, call S-Pack, click LIST and complete the requester.
  202.    Single files cannot be extracted from an .SE pack.
  203.  
  204.  
  205.   FLOPPY DISKS
  206.      
  207.     Disks are not re-formatted or re-named automatically, and the necessary
  208.    number should be cleared and numbered before you start a Pack.  DO NOT
  209.    FORMAT TO THE "FAST FILE SYSTEM" - writing to an FFS disk is a lot slower
  210.    than to a normal disk!  For reasonable writing speed call sys:c/Addbuffers
  211.    with as high a setting as you can afford; packing will be very slow if the
  212.    normal default figure of 5 is left unchanged.  To ensure that follow-up
  213.    disks in multi-disk packs can be recognised always use the DRIVE (eg df0:)
  214.    not the diskNAME.
  215.  
  216.  
  217.   DIALOGUE
  218.     
  219.     The output window will show the name of each file as it is packed or
  220.    unpacked.
  221.  
  222.     During compression or decompression of large files the machine may be
  223.    quiet for some time.  To indicate that work is in progress a dot will be
  224.    printed out at intervals.
  225.       
  226.             
  227.   SPEED.
  228.  
  229.    For maximum speed:
  230.  
  231.     The `ADDBUFFERS' setting should be as high as possible - desirably at
  232.    least 100 for any drive or partition used.  This will of course benefit
  233.    all IO, not just S-Pack.  Remember that each buffer costs you some 500
  234.    bytes of ram.
  235.  
  236.     Use the Old File System, not FFS.
  237.  
  238.     If memory is tight, reboot.  This clears fragmentation and improves
  239.    speed by maximising the memory available.
  240.  
  241.     Use RAM for the temporary files.  (Use a floppy only as a last resort).
  242.  
  243.  
  244.   MEMORY CONTROL.
  245.  
  246.     S-PACK can use a lot of memory.  Consider the task of unpacking an .SE
  247.    pack containing a single file of compressed size 1Mbyte (on two disks),
  248.    expanding to 2Mbyte decompressed:
  249.  
  250.     When the file is called the whole executable - on the first disk - is
  251.    loaded into memory like any other executable.   typically   840 Kbytes
  252.  
  253.     Then the two parts are assembled in a temporary file      1000 Kbytes
  254.  
  255.     Next provision for decompression is made:
  256.                                filesize(compressed) +130K     1130 Kbytes      
  257.        
  258.     If (for speed) you are unpacking to ram:       add        2000 Kbytes
  259.  
  260.                                                    Total      4970 Kbytes   
  261.  
  262.     This can be reduced to some 1.14 Mbytes:
  263.  
  264.    1. Reduce the size of the executable part (it must have at least the SE
  265.     header and the start of the first file to be included in the pack - say
  266.     8000 bytes) to a minimum by filling all but some 8000 bytes with rubbish
  267.     before creating the pack, then delete the rubbish.  Saves  832 Kbytes.
  268.       
  269.    2  Locate temporary files anywhere there is 1Mbyte to spare - a hard
  270.      disk partition.  A floppy could be used for smaller files but would
  271.      slow operations considerably.                      Saves 1000 Kbytes
  272.  
  273.    3. Pack/Unpack directly to the final destination.    Saves 2000 Kbytes.
  274.      
  275.     If these steps are taken (where relevant) calculate memory usage as:
  276.  
  277.       Unpack
  278.          130K + largest file (compressed size).
  279.  
  280.       Pack
  281.          300K + largest file (uncompressed size) 
  282.  
  283.    but allow as large a safety factor as you can to ensure that problems
  284.    with fragmented memory are avoided.
  285.  
  286.     
  287.   RECOVERY
  288.  
  289.     One of the features of S-PACK is the ability to recover the bulk of data
  290.    even if one of the disks in the pack develops a fault.  Disks prior to
  291.    the faulty one should unpack correctly.
  292.  
  293.     First run the damaged disk through DISKSALV or a similar recovery
  294.    programme, and try to unpack again.
  295.  
  296.     If still faulty, extract the index.  This will always be possible if the
  297.    last disk is OK, and MAY be possible even if there is a fault on this disk.
  298.    
  299.     Using the index and the EXTRACT option of S-PACK extract files from disks
  300.    following the faulty disk (non-SE packs only).
  301.  
  302.     If the faulty disk can be read at all use the EXTRACT option to get as
  303.    many files from it as possible (non-SE packs only).  Success will depend
  304.    on the precise nature of the fault.
  305.  
  306.     Finally try to load the faulty disk into one of the programmes that 
  307.    allow hex files to be read and written to, and allow the extraction of
  308.    sections of a file (HEX, BEAV, FILEMASTER). If the pack file on the disk
  309.    can be loaded, individual files can be extracted using this format data:
  310.  
  311.      The format of each file is:
  312.  
  313.      Marker:            FI (2 bytes)
  314.                         serial number (2 bytes). Bit 15 will be set if the
  315.                           file is not compressed.
  316.     
  317.      Uncompressed file:
  318.                         size (4 bytes)
  319.                         data        
  320.        To extract the file just copy the data section to a new file. 
  321.  
  322.      Compressed file:
  323.                         uncompressed size (4 bytes)
  324.                         compressed size (4 bytes)
  325.                         crc (2 bytes)
  326.                         data
  327.        To extract the file copy the whole to a new file and change the first
  328.       4 bytes (marker + serial number) from FIxx to HILH.  You now have a file
  329.       which can be de-compressed by P-Compress2, or if a text can be read by
  330.       and saved in clear from the latest version of P-Reader. (V7.1).
  331.       Alternatively S-PACK the extracted file using the "RECOMP" option and
  332.       then unpack it.
  333.     
  334.      Finally, even if the disk itself is damaged so severely that the PACK
  335.     file on it cannot be read as a file, it should still be possible to
  336.     extract sectors using Nic Wison's TRACKDOS and to reconstitute individual
  337.     files from these.  This is not easy.
  338.  
  339.  
  340.  
  341.      
  342.            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  343.  
  344.  
  345.    The compression code used is based on that used in Matthias Meixner's 
  346.   SHRINK archiver, modified to improve speed.  A large measure of the
  347.   credit for S-Pack's performance should be given to Matthias Meixner for
  348.   this extremely efficient code.  
  349.   
  350.    S-Pack is Freeware.  It may be copied and distributed freely and used
  351.   without charge for non-commercial purposes.  Authority for commercial
  352.   use should be obtained from the author below.
  353.  
  354.    No responsibility can be accepted for any loss occasioned by use of the
  355.   programme.
  356.  
  357.  
  358.   Chas A. Wyndham,
  359.   1265 Canning Mills Road,
  360.   Roleystone,
  361.   WA 6111.
  362.   Australia 
  363.  
  364.  
  365.